package cn.edu.njpi;

import javafx.application.Application;
import javafx.application.HostServices;
import javafx.scene.Cursor;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;

/**
 * @author 朱宗辉
 * @version V1.0
 * @Package cn.edu.njpi
 * @date 2022/5/10 8:48 PM
 */
public class Main extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        HostServices hostServices = getHostServices();
        hostServices.showDocument("http://192.168.200.10/dashboard/auth/login/?next=/dashboard/");

        Button button = new Button("按钮");
        button.setPrefWidth(50);
        button.setPrefHeight(20);
        button.setCursor(Cursor.CROSSHAIR);

        Group group = new Group();
        group.getChildren().add(button);

        Scene scene = new Scene(group);
        //scene.setCursor(Cursor.CLOSED_HAND);
        scene.setCursor(Cursor.cursor("http://192.168.200.10/dashboard/static/dashboard/img/logo-splash.svg"));
        stage.setScene(scene);
        stage.setTitle("javafx");
        stage.setWidth(800);
        stage.setHeight(800);
        stage.show();
    }
}
